<?php 
session_start();
?>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
<html>
<head>
<meta charset="UTF-8">
<title>电子商务数据上报系统</title>
<link href="css/style.css" type="text/css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<script type="text/javascript">
function checkInput(){
	var userpwd = $("input[name=userpwd]");
	var newpwd = $("input[name=newpwd]");
	var newpwd1 = $("input[name=newpwd1]");
	if($.trim(userpwd.val()).length<=0){alert("原密码不允许为空");userpwd.focus();return;}
	if($.trim(newpwd.val()).length<=0){alert("新密码不允许为空");newpwd.focus();return;}
	if($.trim(newpwd1.val()).length<=0){alert("确认新密码不允许为空");newpwd1.focus();return;}
	if($.trim(newpwd.val())!=$.trim(newpwd1.val())){
		alert("新密码 与 确认新密码 不一致，请重新输入！");
		newpwd.val("");
		newpwd1.val("");
		newpwd.focus();
		return;
	}
	$("#command").submit();
	$('#submitbtn').attr("disabled","true");
}
</script>
</head>
<body>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
	<tr><td align="center">
		<br/><h1>修改密码</h1>
		<form id="command" action="editPwdData.php" style="margin:0px;padding:0px;" method="post">
		<table cellspacing="0" cellpadding="3" rules="all"
			style="border-width:1px;border-style:solid;width:350px;border-collapse:collapse;">
			<tr>
				<td style="background-color:#E3F2F2;width:35%;" align="right">
					<span>站点编号：</span>
				</td>
				<td style="background-color:#E3F2F2;width:65%;">
					<?php echo $_SESSION['code'];?>
					<input name="username" type="hidden" value="<?php echo $_SESSION['code'];?>"/>
				</td>
			</tr>
			<tr>
				<td align="right"><span>原密码：</span></td>
				<td>
					<input name="userpwd" type="password" maxlength="15" style="width:100%;"/>
				</td>
			</tr>
			<tr>
				<td align="right" style="background-color:#E3F2F2;">
					<span>新密码：</span>
				</td>
				<td style="background-color:#E3F2F2;">
					<input name="newpwd" type="password" maxlength="15" style="width:100%;"/>
				</td>
			</tr>
			<tr>
				<td align="right"><span>确认新密码：</span></td>
				<td>
					<input name="newpwd1" type="password" maxlength="15" style="width:100%;"/>
				</td>
			</tr>
		</table>
		
		<br/>
		<input id="submitbtn" type="button" value=" 修 改  " onclick="checkInput()" class="systembutton"/>
		<input type="reset" value=" 取 消  " class="systembutton"/>
		</form>
	</td></tr>
</table>
</body>
</html>